from django.db import models 

# Create your models here.

class Repair(models.Model):
    Com_model = models.TextField(max_length=4)
    Repair = models.TextField()
    status = models.CharField(max_length=30)
    tech = models.CharField(max_length=30, blank = True)
    fix_date = models.DateField(blank = True, null = True)

    def __unicode__(self):
       	return u'%s %s %s %s %s' % (self.Com_model, self.Repair, self.status, self.tech, self.fix_date)  # show detail instead object

class Technician(models.Model):
	first_name = models.CharField(max_length = 15)
	last_name = models.CharField(max_length = 20)

	def __unicode__(self):
            return u'%s %s' % (self.first_name, self.last_name)  # show detail instead object

class History(models.Model):
    com_model = models.CharField(max_length=30)
    Submit_time = models.CharField(max_length=3)
    
    def __str__(self):
	return self.com_model

